﻿<%@ page contentType="text/html;charset=utf-8" pageEncoding="UTF-8"
	language="java"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
	session.removeAttribute("_LOGONUSER_");
%>
<head>
  <TITLE>71bill宝数金融</TITLE>
<META name="GENERATOR" content="MSHTML 11.00.9600.16663">
<META http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="<%=request.getContextPath()%>/favicon.ico" rel="icon" type="image/x-icon" />
	<LINK href="<%=request.getContextPath()%>/style/main1008.css" rel="stylesheet" type="text/css">
	<LINK href="<%=request.getContextPath()%>/style/reset1008.css" rel="stylesheet" type="text/css">
	<LINK href="<%=request.getContextPath()%>/style/easyui.css" rel="stylesheet" type="text/css">
	<script src="<%=request.getContextPath()%>/script/jquery-1.4.2.js" type="text/javascript"></script>
		<script type="text/javascript">
			//enter登录 火狐和ie都支持
			function enterSubmitForm() {
				if (window.event.keyCode == 13) {
					$('#loginForm').submit();
				}
			}

			var tp = true;

			function reflashVerifyCode(temp) {
				if (temp == 1) {
					var ctrl = document.getElementById("_verifycode");
					ctrl.src = "<%=request.getContextPath()%>/manage/login/verify?rnd="
							+ new Date().getTime()
							+ parseInt(Math.random() * (10000));
					$("#_verifycode").show();
					$("#changeVerifyCodeBtn").show();
					tp = false;
				} else if (tp) {
					var ctrl = document.getElementById("_verifycode");
					ctrl.src = "<%=request.getContextPath()%>/manage/login/verify?rnd="
							+ new Date().getTime()
							+ parseInt(Math.random() * (10000));
					$("#_verifycode").ready(function() {
						$("#_verifycode").show();
						$("#changeVerifyCodeBtn").show();
					});

				}
			}
			function beforesubmit() {
				var _msg = "";
				var _userName = $("#userName").val();
				var _passWord = $("#passWord").val();
				var _verifyCode = $("#verifyCode").val();
				if (!(_userName && _userName.length > 0)) {
					_msg = "请输入用户名";
				}
				if (!(_passWord && _passWord.length > 0)) {
					_msg = "请输入密码";
				}
				if (!(_verifyCode && _verifyCode.length > 0)) {
					_msg = "请输入验证码";
				}
				if (_msg != "") {
					alert(_msg)
				} else {
					$('#loginForm').submit();
				}
			}
			function handleblur(obj) {
				if (obj.id == 'userName') {
					if (obj.value == '') {
						obj.value = '手机号/邮箱/自定义用户';
					}
				}
				if (obj.id == 'passWord') {
					if (obj.value == '') {
						document.getElementById("spanPwd").innerHTML = '密码';
					}
				}
				if (obj.id == 'verifyCode') {
					if (obj.value == '') {
						obj.value = '验证码';
					}
				}
			}
			function handleFocus(obj) {
				if (obj.id == 'userName') {
					obj.value = "";
				}
				if (obj.id == 'passWord') {
					
				}
				if (obj.id == 'verifyCode') {
					obj.value = "";
				}
			}
			$(document).ready(function(){
			  //直接加载验证码
			  reflashVerifyCode(0);
			});
			
		</script>
</HEAD>
  
<body class="nobg loginPage" >
<!-- Main content wrapper -->
<div class="loginWrapper">
    
    <div class="widget">
        <div class="title"><img src="<%=request.getContextPath()%>/images/backgrounds/files.png" alt="" class="titleIcon" /><h6>登录 | 71bill</h6></div>
       <FORM name="loginForm" id="loginForm" action="<%=request.getContextPath()%>/manage/login/toLogin" method="post" class="form">
            <fieldset>
                <div class="formRow">
                    <label for="login">用户名：</label>
                    <div class="loginInput">
						<input name="userName" id="userName" onFocus="handleFocus(this)"
						onBlur="handleblur(this)" type="text" value="手机号/邮箱/自定义用户">
                    </div>
                    <div class="clear"></div>
                </div>
                
                <div class="formRow">
                    <label for="pass">密&nbsp;&nbsp;&nbsp;&nbsp;码：</label>
                    <div class="loginInput">
                    	<input name="passWord" id="passWord" style="width: 200px;"
						onFocus="handleFocus(this)" onBlur="handleblur(this)"
						type="password">
                    </div>
                    <div class="clear"></div>
                </div>
                <div class="formRow">
                    <label for="captcha">验证码：</label>
                    <div id="captchaImg" style="width:90px;float:right;padding-top:2px;"><img style="vertical-align: middle; display: none;"
                             id="_verifycode" alt="验证码"/></div>
                    <div class="loginInput" style="width:100px;"><input name="verifyCode" onBlur="handleblur(this)" type="text"
							value="验证码" onkeydown="enterSubmitForm();"
                               id="verifyCode"
                               onfocus="handleFocus(this);reflashVerifyCode(0);" ></div>
                    <div class="clear"></div>
                </div>
                <div class="loginControl">
                	<SPAN STYLE="color:red"> <c:if test="${null != errorMsg}">
                        <c:out value="${errorMsg}"/></c:if> </SPAN>
                    <span style='align:center'> <input type="button" value="登录" class="dredB logMeIn"  onclick="beforesubmit();return false;" /></span>
                    <div class="clear"></div>
                </div>
            </fieldset>
        </form>
        </br>
		<div>
		   			<span style="font-weight:bold;font-size: 8px;">浏览器推荐：<br>IE11、Chrome40及以上版本（建议XP用户使用Chrome）
				</span></div>
    </div>
</div>    

<!-- Footer line -->
<div id="footer">
    <div class="wrapper">&copy; 2015 71bill | 宝数金融</div>
</div>


</body>
</html>
